﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
namespace BLL
{
    public class BulletinBLL
    {
        private readonly DAL.BulletinDAL bulletindal = new DAL.BulletinDAL();
        /// <summary>
        ///  增加或修改一条数据
        /// </summary>
        public void Add(Albon.Model.BulletinMessage bulletin)
        {
            bulletindal.Add(bulletin);
        }

        /// <summary>
        /// 根据ID返回一条公告信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public DataTable getBulletinByID(string id)
        {
            return bulletindal.getBulletin("ID="+id);
        }

        /// <summary>
        /// 获取所有已通过审核的公告信息
        /// </summary>
        /// <returns></returns>
        public DataTable getAllActiveBulletin()
        {
            return bulletindal.getBulletin("Active=1");
        }
    }
}
